<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="~{fragments/header :: header(title='登录')}"></div>
</head>


<div class="container mt-5" style="max-width: 400px;">
    <div class="card shadow">
        <div class="card-body">
            <h3 class="card-title mb-4">欢迎登录</h3>
            <form th:action="@{/user/login}" id="loginForm" method="post">
                <div class="mb-3">
                    <label class="form-label">用户名</label>
                    <input type="text" name="username" class="form-control" placeholder="请输入用户名">
                </div>
                <div class="mb-3">
                    <label class="form-label">密码</label>
                    <input type="password" name="password" class="form-control" placeholder="请输入密码">
                </div>
                <span th:text="${msg}" style="color: red"></span>
                <button type="submit" class="btn btn-primary w-100 mb-3">登录</button>
                <div class="d-flex justify-content-between">
                    <a th:href="@{/register.html}"  class="text-decoration-none">注册账号</a>
                </div>
            </form>

        </div>
    </div>
</div>


</html>